/// YApi QuickType插件生成，具体参考文档:https://plugins.jetbrains.com/plugin/18847-yapi-quicktype/documentation

import 'dart:convert';

UserInfo userInfoFromJson(String str) => UserInfo.fromJson(json.decode(str));

String userInfoToJson(UserInfo data) => json.encode(data.toJson());

class UserInfo {
    UserInfo({
        required this.msg,
        required this.code,
        required this.data,
    });

    String msg;
    int code;
    Data data;

    factory UserInfo.fromJson(Map<dynamic, dynamic> json) => UserInfo(
        msg: json["msg"],
        code: json["code"],
        data: Data.fromJson(json["data"]),
    );

    Map<dynamic, dynamic> toJson() => {
        "msg": msg,
        "code": code,
        "data": data.toJson(),
    };
}

class Data {
    Data({
        required this.vipEndTime,
        required this.deviceId,
        required this.userId,
        required this.loginType,
        required this.username,
        required this.inviterCode,
        required this.token,
    });

    int vipEndTime;
    String deviceId;
    String userId;
    int loginType;
    String username;
    String inviterCode;
    String token;

    factory Data.fromJson(Map<dynamic, dynamic> json) => Data(
        vipEndTime: json["vip_end_time"],
        deviceId: json["device_id"],
        userId: json["user_id"].toString(),
        loginType: json["login_type"],
        username: json["username"],
        inviterCode: json["inviter_code"],
        token: json["token"],
    );

    Map<dynamic, dynamic> toJson() => {
        "vip_end_time": vipEndTime,
        "device_id": deviceId,
        "user_id": userId,
        "login_type": loginType,
        "username": username,
        "inviter_code": inviterCode,
        "token": token,
    };
}
